package io.gitee.zicai.task

import io.gitee.zicai.task.job.JobService
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner
import java.util.concurrent.TimeUnit

/**
 * TaskTest
 * @author zicai
 * @since 2020-05-18
 */
@RunWith(SpringRunner::class)
@SpringBootTest
open class TaskTest {

    @Autowired
    private lateinit var jobService: JobService

    @Test
    fun test() {
        jobService.start("task")

        TimeUnit.SECONDS.sleep(30)
    }
}